<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>   
<script type="text/javascript">
function mg_saveappsdk(type)
{

    if (!confirm("确定继续？"))
    {
        return false;
    }
    var url = "mg/appsdk/save.do?type=" + type;
    var objectid = "cm_cpappdiv";
    postXMLHttpRequest(url, "myform", objectid); 
}
</script>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>   
  <form id="myform" name="myform"
        method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="3">
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="25" colspan="3" class="table_blue">
        <strong><img src="images/dot.jpg" width="13" height="9">应用支持的SDK</strong>
		<input type="hidden" id="model.appnumber" name="model.appnumber"  value="<s:property value="model.appnumber" />" />
		<input type="hidden" id="model.cpid" name="model.cpid"  value="<s:property value="model.cpid" />" />
        </td>
    </tr>
    <tr>
	      <td class="table_g1" align="center" width="10%">
	      </td>
	      <td class="table_g2" align="center" width="20%">sdk名称</td>
	      <td class="table_g2" align="center">排序</td>
	    </tr>
    <s:iterator value="sdklist" status="stat"> 
    	<s:set var="sort" value="5"></s:set>
    	<s:set var="ischecked" value="0"></s:set>
    	
    	<s:iterator value="list" status="stat1">
    		<s:if test="sdkid==sdklist.get(#stat.index).id">
    			<s:set var="sort" value="sdksort" />
    			<s:set var="ischecked" value="1"/>
    		</s:if>
    	</s:iterator> 
	    <tr>
	      <td class="table_w1" align="center" width="10%">
	      	<input type="checkbox" id="sdkid" name="sdkid" <s:if test="#ischecked==1">checked</s:if> value="<s:property value="id"/>"/>
	      </td>
	      <td class="table_w2" align="center" width="20%">&nbsp;<s:property value="sdkname"/></td>
	      <td class="table_w2" >&nbsp;
	        <input id="sdksort_<s:property value="id"/>" name="sdksort_<s:property value="id"/>" type="text" size="20" 
	          value="<s:property value="#sort" />" /></td>
	    </tr>
    </s:iterator>
    <tr>
      <td colspan="3" class="table_w1" align="center">
        <button id="btn2" dojoType="dijit.form.Button"
            onclick="mg_saveappsdk('insert');">保存</button>
      </td>      
    </tr>
    <tr> 
      <td colspan="3" background="images/table_bom_bg.jpg">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/table_bom_left.jpg" width="20" height="15"></td>
          <td></td>
          <td align="right">
            <img src="images/table_bom_right.jpg" width="20" height="15"></td>
        </tr>
        </table>
      </td>
    </tr>
  </table>  
  </form>
  </td>
  <td width="5"></td>
  </tr>
  </table>